package com.yehongyu.mytools.basic.designpattern.observer;


public class EntryClass {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		FrameSubject frameSubject = new FrameSubject();
		FrameObserver frameObserver = new FrameObserver();
		// 在Subject中注册Observer，将两者联系在一起
		frameSubject.getContentPane();
		frameSubject.setTitle("frameSubject");
		frameSubject.setLocation(100, 100);
		frameSubject.setSize(200, 200);
		frameSubject.registerObserver(frameObserver);
		frameSubject.setVisible(true);
		frameObserver.getContentPane();
		frameObserver.setTitle("frameObserver");
		frameObserver.setSize(200, 200);
		frameObserver.setVisible(true);

	}

}
